//
//  CardTextCell.m
//  LuCaiZhu
//
//  Created by stella Ma on 2018/11/14.
//

#import "CardTextCell.h"

@implementation CardTextCell

- (void)awakeFromNib {
    [super awakeFromNib];
    [self.mTextField addTarget:self action:@selector(textFieldDidChange:) forControlEvents:UIControlEventEditingChanged];
}

- (void)textFieldDidChange:(UITextField *)textfield {

    //限制最长不超过30位
    if (textfield.text.length>30) {
        textfield.text = [textfield.text substringToIndex:30];
    }
    
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
